package com.example.library.mapper;

import com.example.library.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BookMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Book record);

    int insertSelective(Book record);

    Book selectByID(Integer id);

    List<Book> selectByName(@Param("name") String name);

    List<Book> selectByCategory(@Param("category") Integer category);

    List<Book> select();

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);
}